package cn.bqjr.eily.samples.service.commom.impl;

import cn.bqjr.eily.samples.dao.common.CommonDao;
import cn.bqjr.eily.samples.service.commom.ICommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommonServiceImpl implements ICommonService {

    @Autowired
    private CommonDao commonDao;

    @Override
    public String getCustomVal(String table, String keyColumn, String valColumn, String key) {
        return String.valueOf(commonDao.selectCustomVal(table, keyColumn, valColumn, key)
                .get(0)
                .get(valColumn));
    }
}
